using System;
using System.Collections.Generic;
using System.Text;
namespace BLL.BusinessLayer
{
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
	[Serializable]
	public class ClsChoices: BusinessObjectBase
	{

		public ClsChoices() {}

		#region InnerClass
		public enum ClsChoicesFields
		{
			ChoiceID,
			ChoiceName,
			Description,
			IsCorrect,
			Media,
			QuestionID
		}
		#endregion

		#region Data Members

			int _choiceID;
			string _choiceName;
			string _description;
			int? _isCorrect;
			string _media;
			int? _questionID;

		#endregion

		#region Properties

		public int  ChoiceID
		{
			 get { return _choiceID; }
			 set
			 {
				 if (_choiceID != value)
				 {
					_choiceID = value;
					 PropertyHasChanged("ChoiceID");
				 }
			 }
		}

		public string  ChoiceName
		{
			 get { return _choiceName; }
			 set
			 {
				 if (_choiceName != value)
				 {
					_choiceName = value;
					 PropertyHasChanged("ChoiceName");
				 }
			 }
		}

		public string  Description
		{
			 get { return _description; }
			 set
			 {
				 if (_description != value)
				 {
					_description = value;
					 PropertyHasChanged("Description");
				 }
			 }
		}

		public int?  IsCorrect
		{
			 get { return _isCorrect; }
			 set
			 {
				 if (_isCorrect != value)
				 {
					_isCorrect = value;
					 PropertyHasChanged("IsCorrect");
				 }
			 }
		}

		public string  Media
		{
			 get { return _media; }
			 set
			 {
				 if (_media != value)
				 {
					_media = value;
					 PropertyHasChanged("Media");
				 }
			 }
		}

		public int?  QuestionID
		{
			 get { return _questionID; }
			 set
			 {
				 if (_questionID != value)
				 {
					_questionID = value;
					 PropertyHasChanged("QuestionID");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("ChoiceID", "ChoiceID"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("ChoiceName", "ChoiceName",1000));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Description", "Description",1000));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Media", "Media",1000));
		}

		#endregion

	}
}
